package com.jiandan.test;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.util.Log;
import android.view.View;

import com.jiandan.annotation.FastClick;
import com.jiandan.gradledemo.R;


public class MainActivity extends AppCompatActivity implements View.OnClickListener {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        findViewById(R.id.btn_first).setOnClickListener(new View.OnClickListener() {
            @FastClick(2000)
            @Override
            public void onClick(View v) {
                Log.d("MainActivity", "onClick: 按钮1");
                testFuc();
            }
        });
        findViewById(R.id.btn_second).setOnClickListener(new View.OnClickListener() {
            //@FastClick
            @Override
            public void onClick(View v) {
                Log.d("MainActivity", "onClick: 按钮2");
            }
        });
        //findViewById(R.id.btn_second).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        Log.d("MainActivity", "onClick");
    }


    @FastClick
    private void testFuc() {
        Log.d("MainActivity", "testFuc");
        testFuc("test");
    }

    @FastClick
    private void testFuc(String a) {
        Log.d("MainActivity", "testFuc " + a);
    }
}
